1. Field of the Invention
The present invention relates to an image processing technique and, more particularly, to an image processing technique for extracting feature points from a raster image, and converting the raster image into a vector image by executing functional approximation.
2. Description of the Related Art
In recent years, devices such as a display and printer having different resolutions tend to be used together, and cases wherein identical image information is displayed at different resolutions are increasing. When an image suited to a low-resolution device is to be displayed on a high-resolution device, image deterioration stands out since the resolution of the device cannot be utilized. For this reason, a vectorization technique for converting an image expressed in a raster format into a vector format, which is independent of a resolution, is required.
Such vectorization techniques have been conventionally examined. For example, a vectorization method for a binary image is disclosed in Japanese Patent Laid-Open No. 2005-310070. This method divides a contour of a binary image at points which meet the following conditions, and approximates divided sections using Bézier curves.
Angular point 1: a point where a change in vector that connects neighboring point sequences is acute-angled
Angular point 2: two corner points when a distance between continuous points is larger than a certain threshold
Inflection point: a point where a sign of an outer product of continuous vectors changes
As a sequence of coordinate points extraction processing, for example, a method of Japanese Patent No. 3026592 is disclosed. According to this method, inter-pixel vectors in horizontal and vertical directions are detected based on states of a pixel of interest and its neighboring pixels, and connection states of these inter-pixel vectors are discriminated, thereby extracting a sequence of coordinate points of image data from the connection states of the inter-pixel vectors. This sequence of coordinate points extraction method can provide a significant width even to a thin line having a 1-pixel width by extracting a sequence of coordinate points for respective pixel edges in place of a pixel central position.
A vectorization method which targets not only a binary image but also a line image or illustration image including several colors is disclosed in, for example, Japanese Patent Laid-Open No. 2006-031245. This method can vectorize a color image without generating any gap in principle by a processing sequence for extracting boundary lines common to color regions, and executing functional approximation. A sequence of coordinate points extraction method in this case extracts sequences of coordinate points by tracking lines having colors which have a difference equal to or larger than a threshold between neighboring pixels unlike Japanese Patent No. 3026592. Boundary lines common to color regions are calculated from the extracted sequences of coordinate points, and a common functional approximation result is applied upon outputting the color regions, thus attaining vectorization.
Once approximation processing is executed, an approximation method to smoothly connect approximate sections is disclosed in, for example, Japanese Patent Laid-Open No. 04-116690. This method attains data reduction, while maintaining and improving the smoothness of character contour lines by combining a plurality of sections expressed by curve formula A, and approximating and expressing the combined section by curve formula B that is of a higher order. This reference discloses the following method. That is, the combined section is partitioned by division points, and partitioned sections are approximated by curve formula B. However, when each individual partitioned section is independently approximated, the smoothness is lost before and after each division point. Hence, by correcting the positions of control points so that two curves have common tangents, the smoothness before and after each division point is maintained.
However, this related art does not determine whether or not tangential directions are adjusted before and after each division point upon execution of the approximation processing. For this reason, when the tangential directions are adjusted, adjustment processing is executed for all division points. Hence, when an input image shown in FIG. 1A is input, an edge portion is rounded, as shown in FIG. 1B. When the tangential directions are not adjusted, since all sections are independently approximated, continuity at the division points is not guaranteed, and a middle portion of a curve is consequently angulated, as shown in FIG. 1C.
In order to prevent this, sections for which the tangential directions are to be adjusted and those for which the tangential directions are not to be adjusted can be adaptively determined. However, when this determination processing is executed at a stage where the tangential directions are decided after the division points have been decided, inclination change amounts have to be calculated every time the tangential direction is decided. Hence, several sides before and after a point of interest are required to be referred to, which results in complicated processing.